package com.yan.token.controller;

import com.yan.token.module.App;
import com.yan.token.repository.AppRepository;
import com.yan.token.repository.jdbc.JdbcAppRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yanheng
 * @data 2020/1/3 16:25
 */

@RestController
public class AppController {
    @Autowired
    private AppRepository appRepository;

    @GetMapping("/app/{id}")
    public App getAppById(@PathVariable("id") String id){
        return appRepository.findById(id);
    }


}
